<!--监管牧场/抵押牛只  -->
<template>
	<border cardTitle="随访统计" :isLonger="true">
		<div class="outBox flex flex-align-center flex-pack-center">
			<div class="leftBox flex-v" style="height: auto;">
				<div class="imgBox flex flex-pack-center flex-align-center">
					<img src="/img/dashboard/bank/Frame.png" alt="" />
				</div>
				<div class="count flex flex-pack-center flex-align-center">
					<span>10次</span>
				</div>
				<div class="title flex flex-pack-center flex-align-center">
					<span>已随访</span>
				</div>
			</div>
		</div>
	</border>
</template>

<script>
	import border from '../../border.vue';
	import StatisticsMixins from '../../../StatisticsMixins';
	import {
		bigScreenApi
	} from '@/api/index';

	export default {
		components: {
			border
		},
		mixins: [StatisticsMixins],
		data() {
			return {
				total: 0,
				formData: {
					cowCount: 0,
					deptCount: 0,
					Inventory: 0
				}
			};
		},
		props: {
			level: {
				type: [String, Number],
				default: 0
			},
			cityId: {
				type: [String, Number],
				default: ''
			}
		},
		watch: {
			level: {
				handler(newV, oldV) {
					this.getInfo();
				},
				immediate: true
			}
		},
		created() {
			this.getInfo();
		},
		methods: {
			getInfo() {
				this.$postAction(bigScreenApi.pledgeFarmCowCount, {
					xzqhbm: this.level > 1 ? this.cityId : '',
					level: this.level
				}).then(res => {
					if (res && res.code == 1) {
						this.formData.cowCount = res.data.cowCount;
						this.formData.deptCount = res.data.deptCount;
					}
				});
				this.$postAction(bigScreenApi.inventoryCount, {
					xzqhbm: this.level > 1 ? this.cityId : '',
					level: this.level
				}).then(res => {
					if (res && res.code == 1) {
						this.formData.Inventory = res.data.inventoryNum;
					}
				});
			}
		}
	};
</script>
<style scoped lang="less">
	.outBox {
		width: 100%;
		height: 100%;

		// padding: 0.1rem 0.1rem;
		.leftBox {
			width: 50%;
			height: 100%;

			// border: 1px solid red;
			.imgBox {
				width: 100%;
				height: 0.9rem;

				img {
					width: 0.9rem;
					height: 0.9rem;
				}
			}

			.count {
				width: 100%;
				height: 0.37rem;

				span {
					font-size: 0.24rem;
					font-weight: 600;
					color: #ffffff;
				}
			}

			.title {
				width: 100%;
				height: 0.22rem;

				span {
					font-size: 0.14rem;
					font-weight: 500;
					color: #8beaff;
					line-height: 0.16rem;
				}
			}
		}
	}
</style>